package com.share.homestay.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.share.homestay.dao.HostelSystemMapper;
import com.share.homestay.entity.HostelSystem;
import com.share.homestay.pojo.JsonResult;
import com.share.homestay.service.HostelSystemService;
import org.springframework.stereotype.Service;

@Service
public class HostelSystemServiceImpl extends ServiceImpl<HostelSystemMapper, HostelSystem> implements HostelSystemService {
    @Override
    public JsonResult findPageHostelSystem(HostelSystem hostelSystem, Long pageNum, Long pageSize) {
        return JsonResult.success("成功",this.baseMapper.findPageHostelSystem(hostelSystem,pageNum,pageSize),this.baseMapper.count(hostelSystem));
    }

    @Override
    public Long delByIdHostelSystem(String id) {
        return (long) this.baseMapper.deleteById(id);
    }
}
